const MYSQL = require("../../../../sql");
const SqlName = "shopping_store";
/**
 * 获取商城服务列表
 * @param {object} params
 * @param {string} params.id 角色id
 * @param {string} params.menu 菜单id
 * @returns {Promise<{code:string,msg:string}>}
 */
module.exports = async (params = {}) => {
  try {
    let query = `SELECT * FROM ${SqlName}`;
    let result = await MYSQL.promise().query(query);
    return {
      code: 0,
      msg: "获取成功",
      data: result[0],
    };
  } catch (error) {
    throw error;
  }
};
